#include <stdio.h>
#include <math.h>
int main()
{
	float a,b,c;
	float e=0.001;
	a=-3;
	b=7;
	do
	{	
	
		c=(a+b)/2;
		printf("temp %f\n",(a-1)*(a-1)-exp(a)/2,(c-1)*(c-1)-exp(c)/2,(b-1)*(b-1)-exp(b)/2);
		printf("%f %f %f\n",a,c,b);
		if ((a-1)*(a-1)-exp(a)/2>0)
			if ((c-1)*(c-1)-exp(c)/2>0)
				a=c;
			else
				b=c;
		else
			if ((c-1)*(c-1)-exp(c)/2<0)
				a=c;
			else
				b=c;
		
	}	while (fabs(b-a)>2*e&&(c-1)*(c-1)-exp(c)/2!=0);
	printf("C=%f",c);
	return 0;

}